package org.masterview.user.client.validation;

public class ValidatorBuilder
{
    public static Validator buildFromFilterExpression(String expression) {
        String regexp;
        regexp = expression.replaceAll("[*]", ".*");
        regexp = regexp.replaceAll("[?]", ".");

        return new RegexpValidator(regexp);
    }
}
